package com.hill.study;

public class ExcptionTest {
    //可能存在异常方法
    static void test( int a) throws MyException {
        if(a>130){
            throw new MyException(a);
        }
        System.out.println("ok");
    }

    public static void main(String[] args) {
        try {
            test(90);
        } catch (MyException e) {
            System.out.println("age 不能大于130");
           // e.printStackTrace();
        } finally {
            System.out.println("it is ok");
        }
    }
}
